import React from 'react'
import './system.css'
import Header from '@common/header'
import { Button } from 'antd';

class System extends React.Component {

  state = {
    headerTitle: '版本号',
    headerOptions: [
      { name: '系统设置' },
      { name: '查看版本号' },
    ]
  }

  componentDidMount() {
  }

  // 退出登录
  quitLogin = () => {
    window.localStorage.removeItem('logined')
    this.props.history.replace('/login')
  }

  render() {
    let { headerTitle, headerOptions } = this.state
    return (
      <div className="_system">
        <Header title={ headerTitle } options={ headerOptions }></Header>
        <div className="system-container">
          <div className="system-box">
            <img className="system-img" src="/images/system-info.png" alt=""/>
            <div className="system-title">预算项目申报系统</div>
            <div className="system-versions">版本号 V1.0.0</div>
            <Button className="system-quit_button" onClick={ this.quitLogin }>退出登录</Button>
          </div>
        </div>
      </div>
    )
  }

}

export default System